<template>
  <div class="my-date">
    <el-date-picker
      v-model="date"
      type="daterange"
      range-separator="~"
      start-placeholder="请选择日期"
      end-placeholder="请选择日期"
      :style="'width:' + width + 'px'"
    >
    </el-date-picker>
  </div>
</template>

<script>
export default {
  props: ["width"],
  data() {
    return {
      date: "",
    };
  },
};
</script>

<style>
.my-date .el-range-input {
  background-color: #f2f2f2;
}

.my-date .el-input__inner {
  background-color: #f2f2f2;
  border: none;
}

.my-date:hover .el-input__inner {
  background-color: #ffffff;
}

.my-date:hover .el-range-input {
  background-color: #ffffff;
}

.my-date input::-webkit-input-placeholder{
  color: black;
  font-family: PingFangSC-Regular, "PingFang SC", sans-serif;
  font-weight: 400;
  font-style: normal;
  text-align: left;
}
</style>